package com.mx.project.dao;

import com.mx.project.pojo.Cart;
import com.mx.project.vo.CartInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CartMapper {
    int deleteByPrimaryKey(Integer sid);

    int insert(Cart record);

    int insertSelective(Cart record);

    Cart selectByPrimaryKey(Integer sid);

    int updateByPrimaryKeySelective(Cart record);

    int updateByPrimaryKey(Cart record);

    List<CartInfo> selectCartInfoByUid(@Param("uid") Integer uid);

    Cart selectCartByCidAndUid(@Param("pid") Integer pid,@Param("uid") Integer uid);

    int updateCartCount(@Param("sid") Integer sid,@Param("count") Integer count);

    int deleteByPidAndUid(@Param("pid") Integer pid,@Param("uid") Integer uid);

    int updateMulCartCount(@Param("uid") Integer uid,@Param("count") Integer count,@Param("pid") Integer pid);

    int deleteByUid(@Param("uid")Integer uid);
}